package com.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Data
@TableName("t_video")
@ApiModel(value = "Video对象", description = "视频表")
public class Video implements Serializable {

    @ApiModelProperty("主键id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("用户id")
    @TableField("userId")
    private Long userId;

    @ApiModelProperty("视频链接")
    @TableField("videoUrl")
    private String videoUrl;

    @ApiModelProperty("视频封面图片的链接")
    @TableField("videoCover")
    private String videoCover;

    @ApiModelProperty("视频标题")
    @TableField("videoTitle")
    private String videoTitle;

    @ApiModelProperty("0：自制  1：转载")
    @TableField("videoType")
    private String videoType;

    @ApiModelProperty("视频时长")
    @TableField("videoDuration")
    private Integer videoDuration;

    @ApiModelProperty("视频播放量")
    @TableField("videoPlay")
    private Integer videoPlay;

    @ApiModelProperty("视频所属分区：0鬼畜  1音乐  2电影")
    @TableField("videoPartition")
    private String videoPartition;

    @ApiModelProperty("视频简介")
    @TableField("videoIntroduction")
    private String videoIntroduction;

    @ApiModelProperty("创建时间")
    @TableField("createTime")
    private Date createTime;

    @ApiModelProperty("更新时间")
    @TableField("updateTime")
    private Date updateTime;

    @ApiModelProperty("逻辑删除")
    @TableField("isDel")
    private Integer isDel;

    @TableField(exist = false)
    private List<VideoTag> videoTagList;  //标签列表（一个视频可以同时有多个不同的标签）

    @TableField(exist = false)
    private Integer currentSize = 30;
    @TableField(exist = false)
    private Integer currentPage = 1;

    // 搜索页排序方式（综合排序default、最多播放play、最新发布createTime、最多评论comment、最多收藏collection）
    @TableField(exist = false)
    private String currentOrder;

    @TableField(exist = false)
    private String userName;
    @TableField(exist = false)
    private String nickName;
    @TableField(exist = false)
    private String userCover;
    @TableField(exist = false)
    private String userIntroduction;

    // 是否已经收藏
    @TableField(exist = false)
    private Boolean hasCollection;
}
